//  Android Carpool System
//  2011-2011
//  Author: Jinhuan Wang
//  name: d2spost.java
//  description: driver post a request to server 
//$history: /carpool/scr/com/DataExange/d2sRequest.java$

/*************************************************/
package com.carpool.message;

import java.util.ArrayList;
import java.util.List;

public class d2sRequest extends RequestMessage {
	private String totalDistance;
	private String requirement;
	private int capacity;
	private List<MyGeoPoint> GeoPoints;

	public void setTotalDistance(String totalDistance) {
		this.totalDistance = totalDistance;
	}

	public String getTotalDistance() {
		return totalDistance;
	}

	public void setGeoPoints(List<MyGeoPoint> GeoPoints) {
		this.GeoPoints = GeoPoints;
	}
	public void addGeoPoints(MyGeoPoint GeoPoint) {
		if(this.GeoPoints==null)
		{
			this.GeoPoints=new ArrayList<MyGeoPoint>();
			this.GeoPoints.add(GeoPoint);
		}
		else {
			this.GeoPoints .add( GeoPoint);
		
		}
	}

	public List<MyGeoPoint> getMyGeoPoints() {
		return GeoPoints;
	}

	public void setRequirement(String requirement) {
		this.requirement = requirement;
	}

	public String getRequirement() {
		return requirement;
	}

	public int getCapacity() {
		return this.capacity;
	}

	public void setCapacity(int capacity) {
		this.capacity = capacity;
	}
}
